package com.geely.topic;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author 占助
 * @date 2020/7/13 9:57
 * @description ${直连型信息接收监听类}  通配符模式
 * @Copyright © 吉利汽车
 * @Version: 1.0
 */
@Component
//@RabbitListener(queues = "topic.woman") //监听的队列名称 topic.woman 通配符模式

public class TopicTotalReceiver {

//    @RabbitHandler
@RabbitListener(queues = "topic.woman")
    public void process(Message testMessage) {
        System.out.println("TopicTotalReceiver消费者收到消息  : " + new String(testMessage.getBody()));
    }
}
